function $(id) {
	return document.getElementById(id);
}


window.onload = function() {
	scrollPic();
}

/**
 * 滚动的图片
 */
var nowPic = 0;
function scrollPic(){
	//加载图片信息
	var aDir = $("pic").getElementsByTagName("a");
	//除了nowPic其他dispaly:none
	console.log(aDir.length);
	for(var i=0;i<aDir.length;i++){
		if(i!=nowPic){
			aDir[i].getElementsByTagName("img")[0].style.display="none";
		}else{
			aDir[i].getElementsByTagName("img")[0].style.display="block";
		}
	}
	nowPic++;
	if(nowPic==3){
		nowPic=0;
	}
}
setInterval("scrollPic()",3000);

/*
 * 广告随鼠标滑动
 */
//添加滑动条改变事件
window.onscroll = scrollGuang;

function scrollGuang() {
	
}

function close1() {
	$("mscroll").style.display = "none";
}

/*
 * 随机漂浮的广告图片
 * id=float
 */
//每次移动的距离
var dx = 10;
var dy = 10;
//图片现在的位置
var nowX;
var nowY;
//图片的大小
var picW;
var picH;

function floatPic(){
}
setInterval("floatPic()",500);
